package com.lunhui.search.business.impl;

import com.lunhui.search.business.UserService;
import com.lunhui.search.dal.dao.UserDao;
import com.lunhui.search.dal.model.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * @author renminghe-kg
 */

@Service("userService")
public class UserServiceImpl implements UserService {

    @Resource(name = "userDao")
    private UserDao userDao;

    @Override
    public User searchByName(String userName) throws IOException, RuntimeException {
        return userDao.searchByName(userName);
    }

    @Override
    public Integer addUserAccount(User user) throws IOException, RuntimeException {
        return userDao.addUser(user);
    }
}